package worktime.yft.demo.Mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import worktime.yft.demo.Bean.RecordsProjectBean;
import worktime.yft.demo.Bean.RecordsProjectWeekBean;
import worktime.yft.demo.Bean.RecordsUserBean;
import worktime.yft.demo.Bean.RecordsUserWeekBean;
import worktime.yft.demo.Entity.Record;

import java.util.List;

@Mapper
public interface RecordMapper {
    public int insert(Record record);
    public void update(Record record);
    public Record findRecord(@Param("RecordId")int recordId);
    public List<Record> findRecordByUser(@Param("UserId")String UserId,@Param("startTime")String startTime,@Param("endTime")String endTime);
    public List<RecordsProjectBean> findRecordByProject(@Param("startTime")String startTime, @Param("endTime")String endTime, @Param("ProjectId")int ProjectId);
    public List<RecordsProjectBean> findRecordByProjectDep(@Param("startTime")String startTime, @Param("endTime")String endTime, @Param("ProjectId")int ProjectId, @Param("Department")String Department);
    public List<RecordsProjectWeekBean> findRecordByProjectWeeks(@Param("startTime")String startTime, @Param("endTime")String endTime, @Param("ProjectId")int ProjectId);
    public List<RecordsProjectWeekBean> findRecordByProjectDepWeeks(@Param("startTime")String startTime, @Param("endTime")String endTime, @Param("ProjectId")int ProjectId, @Param("Department")String Department);
    public Record findRecordByTime(@Param("ProjectId")int ProjectId,@Param("UserId")String UserId,@Param("Time")String Time);
    public List<RecordsUserBean> findRecordByUserMon(@Param("startTime")String startTime, @Param("endTime")String endTime, @Param("UserId")String UserId);
    public List<RecordsUserBean> findRecordByUsersMon(@Param("startTime")String startTime, @Param("endTime")String endTime);
    public List<RecordsUserWeekBean> findRecordByUserWeeks(@Param("startTime")String startTime, @Param("endTime")String endTime, @Param("UserId")String UserId);
    public List<RecordsUserWeekBean> findRecordByUsersWeeks(@Param("startTime")String startTime, @Param("endTime")String endTime);
    public void delete(@Param("ProjectId")int ProjectId,@Param("UserId")String UserId,@Param("Time")String Time);
    public List<Integer> findRecordByProjectNum(@Param("startTime")String startTime, @Param("endTime")String endTime, @Param("ProjectId")int ProjectId);
    public List<Integer> findRecordByProjectDepNum(@Param("startTime")String startTime, @Param("endTime")String endTime, @Param("ProjectId")int ProjectId, @Param("Department")String Department);
    public List<Integer> findRecordByUserMonNum(@Param("startTime")String startTime, @Param("endTime")String endTime, @Param("UserId")String UserId);
    public List<Integer> findRecordByUsersMonNum(@Param("startTime")String startTime, @Param("endTime")String endTime);
}
